package com.wmm.common;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


@Document(indexName = "lagou", type = "product")
public class Product {

    @Id
    private int id;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String name;
    @Field(type = FieldType.Double)
    private double price;
    @Field(type = FieldType.Text)
    private String flag;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String goodsDesc;
    @Field(type = FieldType.Keyword, index = false)
    private String images;
    @Field(type = FieldType.Integer)
    private long goodsStock;
    @Field(type = FieldType.Keyword, index = false)
    private String goodsType;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }


    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }


    public String getGoodsDesc() {
        return goodsDesc;
    }

    public void setGoodsDesc(String goodsDesc) {
        this.goodsDesc = goodsDesc;
    }


    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }


    public long getGoodsStock() {
        return goodsStock;
    }

    public void setGoodsStock(long goodsStock) {
        this.goodsStock = goodsStock;
    }


    public String getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(String goodsType) {
        this.goodsType = goodsType;
    }
}
